﻿using RepositoryEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IRepositoryBll
{
    /// <summary>
    /// 角色信息业务访问层接口
    /// </summary>
    public interface IRoleInfoBll :IBaseDeleteBll<RoleInfo>
    {
        //bool AddRoleInfo(RoleInfo roleInfo);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="roleInfoId">角色id</param>
        /// <returns></returns>
        //bool DeleteRoleInfo(string roleInfoId);

        /// <summary>
        /// 软删除
        /// </summary>
        /// <param name="roleInfo"></param>
        /// <returns></returns>
       // bool SoftDeleteRoleInfo(string roleInfoId);

        //bool UpdateRoleInfo(RoleInfo roleInfo);

       // RoleInfo GetRoleInfo(string roleInfoId);
        List<RoleInfo> GetRoleInfoList();
        
        
        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        bool UpdateRoleInfo(string ID ,string RoleName , string Description);
        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <param name="roleName"></param>
        /// <returns></returns>
        object GetRoleInfoListByPage(int page, int limit, out int count, string roleName);
        /// <summary>
        /// 绑定用户
        /// </summary>
        /// <param name="roleInfoId"></param>
        /// <param name="userInfoIds"></param>
        void BindUserInfo(string roleInfoId, List<string> userInfoIds);
        /// <summary>
        /// 已经绑定的用户ID
        /// </summary>
        /// <param name="roleInfoId"></param>
        /// <returns></returns>
        List<string> GetBindUserIds(string roleInfoId);
        /// <summary>
        /// 判断当前角色是否存在
        /// </summary>
        /// <param name="roleName"></param>
        /// <returns></returns>
        bool IsHadRoleInfo(string roleName);

        /// <summary>
        /// 角色已经绑定的菜单ID
        /// </summary>
        /// <param name="menuInfoId"></param>
        /// <returns></returns>
        List<string> GetBindMenuIds(string roleInfoId);

        /// <summary>
        /// 绑定菜单
        /// </summary>
        /// <param name="roleInfoId"></param>
        /// <param name="menuInfoIds"></param>
        void BindMenuIds(string roleInfoId, List<string> menuInfoIds);
    }
}
